package com.jctrip.hotel.route.model.result;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@ApiModel(value = "获取酒店房态接口-返回值")
@Data
@Builder
public class GetHotelRoomStatusResult {

    @ApiModelProperty(value = "酒店唯一编号", required = true)
    private String hotelId;

    @ApiModelProperty(value = "房型列表")
    private List<RoomType> roomTypeList;

    @ApiModel(value = "房型对象")
    @Data
    @Builder
    public static class RoomType {

        @ApiModelProperty(value = "房型编号")
        private String roomTypeCode;

        @ApiModelProperty(value = "房型名称")
        private String roomTypeName;

        @ApiModelProperty(value = "房态列表")
        private List<RoomStatus> roomStatusList;
    }

    @ApiModel(value = "房态对象")
    @Data
    @Builder
    public static class RoomStatus {

        @ApiModelProperty(value = "价格政策对外编号")
        private String pricePolicyCode;

        @ApiModelProperty(value = "价格政策名称")
        private String pricePolicyName;

        @ApiModelProperty(value = "日期")
        @JsonFormat(pattern = "yyyy-MM-dd")
        private Date calDate;

        @ApiModelProperty(value = "可售库存")
        private Integer quota;

        @ApiModelProperty(value = "币种")
        private String currencyCode;

        @ApiModelProperty(value = "门市价")
        private BigDecimal retailPrice;

        @ApiModelProperty(value = "含税采购总价")
        private BigDecimal purchasePrice;

        @ApiModelProperty(value = "早餐数量")
        private Integer breakfastCount;

        @ApiModelProperty(value = "取消政策类型(1=免费退；2=不能退；3=阶梯退；4=限时免费退；5=限时部分退；6=限时扣首晚)")
        private Integer cancelPolicyType;

        @ApiModelProperty(value = "最晚取消时限")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date lastCancelTime;

        @ApiModelProperty(value = "取消规则(JSON格式)")
        private String cancelRule;
    }
}
